Electronic apparatus and system capable of assigning appropriate address

ABSTRACT

In order to prevent unnecessary APIPA process from being executed in a LAN environment which does not adopt APIPA, an ICMP echo request for a predetermined IP address is broadcast. Whether there are more than N apparatuses using APIPA is checked based on the replies, and if there are, IP address setting by APIPA is executed. In a LAN environment which adopts APIPA, whether the IP address to be assigned to an apparatus is already being used by another apparatus is checked. If the date and time when the another apparatus was assigned the IP address is earlier than the date and time when the apparatus was assigned the IP address, APIPA is executed to decide the IP address of the apparatus.

This is a Continuation of application Ser. No. 10/370,622 filed Feb. 24,2003. The disclosure of the prior application is hereby incorporated byreference herein in its entirety.

BACKGROUND OF THE INVENTION

i) Technical Field of the Invention

This invention relates to an electronic apparatus connectable to anetwork, and a system and method for deciding the address of theelectronic apparatus.

ii) Description of the Related Art

Heretofore, several methods have been introduced for assigning anelectronic apparatus an address for communicating with other apparatusesin a network. For example, the electronic apparatus may be assigned apredetermined static address manually, or it may obtain an addressautomatically from a Dynamic Host Configuration protocol (DHCP) serverwhen the TCP/IP protocol is installed. Automatic Private IP Addressing(APIPA) which enables an electronic apparatus to automatically assignitself an IP address is also well-known.

APIPA is now becoming a standard feature of an operating systeminstalled in a personal computer, etc. The electronic apparatus havingthe APIPA feature selects an IP address in a range of addresses from169.254.1.0-169.254.255.255 within an IP address range(169.254.0.0-169.254.255.255) called linklocal address. Then, it usesAddress Resolution Protocol (ARP) to ensure that the chosen address isnot already being used by another electronic apparatus. Once theelectronic apparatus is ensured that the chosen address is not in use,it assigns itself the chosen address. APIPA is also called AutoIP.

FIG. 4 illustrates an example of this APIPA process. Firstly, an IPaddress is selected randomly. In FIG. 4, an address 169.254.123.98 isselected. Then, an ARP request is sent to see whether there is anelectronic apparatus which is assigned the IP address 169.254.123.98. Ifa reply to the ARP request is received from the address 169.254.123.98,it is determined that the chosen address 169.254.123.98 is already inuse, and another IP address is selected randomly again. In FIG. 4, anaddress 169.254.78.22 is selected. An ARP request for the address issent to ensure that the address is not already being used by anotherapparatus. There is no reply this time, and it is thus determined thatthere is no apparatus which is assigned the chosen IP address. The ARPrequest is sent once again by way of precaution. If no reply isreceived, the chosen IP address (169.254.78.22 in FIG. 4) is assigned tothe electronic apparatus.

An electronic apparatus which is not adapted to APIPA generally has afixed IP address, and the fixed IP address is not necessarily alinklocal address. Therefore, if the IP address of an electronicapparatus is automatically assigned by APIPA in a network where thereare many conventional electronic apparatuses which are not adapted toAPIPA (for example, apparatuses with the address 11.22.33.*), thoseconventional electronic apparatuses are unable to access the apparatususing TCP/IP protocol.

In addition, if such an APIPA feature is added to a conventionalelectronic apparatus, there may be a case in which other apparatuses areunable to specify the address assigned by the electronic apparatusitself and consequently, the other apparatuses are unable to communicatewith this electronic apparatus.

For instance, a printer connectable to a network is generally given apredetermined default IP address (for example, 192.0.0.192) beforeshipped. Management software installed in a personal computercommunicates with the printer by the default IP address, and assigns anew IP address to the printer which is appropriate in the network.

However, if the APIPA feature is added to the printer, the printerautomatically assigns itself an IP address in a range from169.254.1.0-169.254.254.255 at random. Therefore, other apparatuses areunable to communicate with the printer by the default IP address, andthe management software cannot access the printer unless it is informedof the IP address assigned by APIPA. In this case, the user has todirectly operate the printer to modify the settings and control theprinter by means of an operation panel thereof, for example. This istime-consuming.

As above, the conventional apparatus comprising the APIPA featureautomatically assigns itself an IP address even if it should not do so,and thus, problems may occur when other apparatuses intend tocommunicate with the apparatus.

In addition, automatic address decision by APIPA is performed at thetime an apparatus is started. The apparatus comprising the APIPA featureselects an IP address randomly in the above explained manner every timethe apparatus is started. As a result, the IP address is changed everytime the apparatus is started. Since there is an apparatus whichcommunicates with other apparatuses with direct addressing, it is notpreferable that the IP address of an apparatus is frequently changed. Ifthe IP address of an apparatus is frequently changed, a conventionalnetwork apparatus which keeps the IP addresses of the other apparatusesas fixed addresses for communication over TCP/IP can no longercommunicate with the other apparatuses.

Furthermore, the more apparatuses are in the network, the higher theratio of the chosen IP address being already in use becomes. As aresult, traffic in the network becomes heavy due to the excess ARPrequests and replies.

In order to prevent an IP address from being changed at the time ofrestoration of an apparatus, the address assigned by APIPA is stored ina nonvolatile storage of the apparatus and selected as the firstpossible IP address of the apparatus. If every apparatus in the networkperforms such a process, the address of the apparatus will be fixed to acertain address as the apparatus is used in a long term. Accordingly,communication with the apparatus by direct addressing becomes possibleand extra communications in the network exchanged to decide an addressof the apparatus are avoided.

However, even if the address stored in the nonvolatile storage is sentas an ARP request, another IP address has to be selected again in casethat there is a reply, that is, the address which has been used by theapparatus is already being used by another apparatus.

In this respect, there may be a case in which the address change is notdesirable. For example, while a printer which has been using an addressA for a long time in a network is turned off, a new personal computerbecomes a member of the network and assigns itself the address A. Whenthe printer is powered on, since the address A is already being used bythe personal computer, the printer has to assign itself a new address B.As a result, the apparatuses in the network which have been transmittingprint data to the address A fail to print the print data.

To prevent the above problem from happening, a fixed IP address may beassigned to the apparatuses adapted to APIPA in the same manner as inthe conventional network apparatuses. Then, it is necessary to find anefficient way to find the apparatuses adapted to APIPA.

SUMMARY OF THE INVENTION

One object of the present invention is to provide an electronicapparatus which can assign an apparatus an appropriate address forcommunication without problem even if the apparatus is adapted to APIPA.

Another object of the present invention is to provide a system andmethod to decide an address of an apparatus without problem even if theapparatus is adapted to APIPA.

Still another object of the present invention is not to execute APIPAwhen unnecessary.

Further object of the present invention is not to change an IP addressof an apparatus adapted to APIPA frequently.

Still further object of the present invention is to enable finding anapparatus adapted to APIPA and to assign the apparatus an appropriateaddress preferentially.

In order to attain the above objects, one aspect of the presentinvention provides an electronic apparatus which determines whether anapparatus having a function to automatically assign itself an addressfor communication should automatically assign itself an address tocommunicate with other apparatuses in a network, based on communicationsexchanged in the network, and outputs the determination result.

For example, an administrator of a network can refer to thedetermination result and determine whether or not to inactivate thefunction of the apparatus to assign itself an address when connectingthe apparatus to the network. If the determination result is that theapparatus should automatically assign itself an address, theadministrator can be ensured that the apparatus having the function toautomatically assign itself an address can be connected to the networkwith that function activated. Otherwise, the administrator inactivatesthe function and configures the apparatus to use a default address, orconnects the apparatus after assigning a static address.

The determination result may be outputted to a display device, printingdevice, audio output device, or a variety of notification devicescomprising the forgoing devices. The determination result may beoutputted to the network as well.

Whether the apparatus having the function to automatically assign itselfan address should execute the function can be determined based oncommunications related to an apparatus which is assigned an address of apredetermined address group, preferably, of an address group from whichan address of the apparatus having the function to automatically assignitself an address is to be chosen.

It is preferable that the predetermined address group is within anaddress range called linklocal address. For instance, in case of an Ipv4network, the address group may comprise addresses in a range from169.254.1.0-169.254.254.255. These are the addresses which can beselected by APIPA, among addresses in a range from169.254.0.0-169.254.255.255 called linklocal address.

It is possible to determine whether there is an apparatus on the networkwhich is assigned an address of the predetermined address group bymaking an inquiry to other apparatuses on the network and examining theresponses. This means that the aforesaid communications can be theresponses to the inquiry.

For example, it is possible to determine whether the apparatus shouldautomatically assign itself an address based on the responses to theinquiry, to the other apparatuses on the network, on whether they havean address of the predetermined address group. If the address of theapparatus is an IP address, an ICMP echo request for the network addressof the predetermined address group can be broadcast, and based on theresponses to the broadcast, it can be determined whether the apparatusshould automatically assign itself an address. Such an inquiry requiresa comparatively short time for the determination.

Whether there is an apparatus on the network which is assigned anaddress of the predetermined address group can be also determined bymonitoring an address contained in a packet exchanged between theapparatuses in the network. In this case, the aforesaid communicationscan be the address monitored.

For example, it is possible to determine that the apparatus shouldautomatically assign itself an address when the monitored address is anaddress of the predetermined address group. In this manner, thedetermination can be performed without transmitting any information tothe network, thus reducing a load of the network.

As above, whether the apparatus should automatically assign itself anaddress can be determined based on the responses to the aforesaidbroadcast or the monitoring, that is, whether an address of thepredetermined address group is detected. If an address of thepredetermined address group is detected, it is possible to determinethat the apparatus should automatically assign itself an address andactivate the function.

Here, if an apparatus exists which has already assigned itself anaddress by mistake and only the determination on whether an address ofthe predetermined address group is detected is performed, there is apossibility that it is wrongly determined that the apparatus shouldautomatically assign itself an address. Particularly, in a networkenvironment where there is an apparatus which automatically assignsitself an address, such as a personal computer with an OS having theAPIPA feature installed, the incorrect result is likely to be obtained.Therefore, even if a response or communication related to such anapparatus is detected, the electronic apparatus of the present inventionmust correctly determine that the apparatus having the function toautomatically assign itself an address should not automatically assignitself an address in the given network.

Accordingly, it is preferable to determine that the apparatus shouldautomatically assign itself an address when more than a predeterminednumber of apparatuses are detected which are assigned an address of thepredetermined address group. Furthermore, it is preferable to determinethat the apparatus should automatically assign itself an address whenmore than a predetermined ratio of apparatuses are detected which areassigned an address of the predetermined address group. Thepredetermined ratio can be a ratio of the number of packets containingthe address of the predetermined group to the total number of packetsmonitored.

Moreover, even if the apparatuses which are assigned an address of thepredetermined address group are not detected more than the predeterminednumber or ratio, it is desirable to be determined that the apparatusautomatically assigns itself an address when the number of the responseto the broadcast or the number of the monitored packets does not reach apredetermined number. In case that a new network is being constructed inwhich each of the apparatuses in the network should automatically assignitself an address, apparatuses which are assigned an address of thepredetermined address group are never detected more than thepredetermined number or ratio even though the response to the broadcastis checked and the monitoring of packets is performed. Thus, the networkin which each of the apparatuses should automatically assign itself anaddress can never be constructed. Therefore, even if the apparatuseswhich are assigned an address of the predetermined group is not detectedmore than the predetermined number or ratio, it is desirable todetermine that the apparatus should automatically assign itself anaddress when the number of the response to the broadcast or the numberof the monitored packets does not reach the predetermined number,assuming that the given network is a new network currently beingconstructed. Particularly, it is extremely effective to determine thatthe apparatus should automatically assign itself an address when thenumber of the response or the number of the monitored packets is equalto zero (0).

Such determination should be performed once again when it is determinedthat the apparatus should not automatically assign itself an address.Because there is no apparatus which is assigned an address of thepredetermined address group if the apparatus is the first member in thenetwork, and it is thus determined that the apparatus should notautomatically assign itself an address. If the determination is madeonce again after a while, it is possible to determine that the apparatusshould automatically assign itself an address anew since an apparatuslike a personal computer which assigns itself an address may be joinedto the network, and the correct determination result can be obtained.

The electronic apparatus which performs such determination and outputsthe result may serve as the apparatus having the function toautomatically assign itself an address.

In this case, it is preferable that the electronic apparatus is providedwith an address decision device instead of or in addition to the outputdevice that outputs the result. When it is determined that the apparatusshould automatically assign itself an address, the electronic apparatusassigns itself an address decided by the address decision device. Thismakes possible for the administrator not to refer to the determinationresult when he/she places the apparatus in the network, since theelectronic apparatus can directly process the determination result.

The expression “instead of or in addition to the output device”indicates that the apparatus may or may not comprise the device thatoutputs the determination result.

As above, the present invention allows appropriate address assignment,and prevents adverse effects which may be caused by an apparatus havingthe function to assign itself an address, regardless of a networkenvironment where the apparatus is placed.

For instance, when it is determined that the electronic apparatus shouldnot automatically assign itself an address and the apparatus has beengiven a default address in advance, other apparatuses can communicatewith this apparatus by the default address.

For instance, it is possible for the apparatus to select an address froma predetermined address group, and after verifying that the chosenaddress is not being used by another apparatus in the network, assignitself the chosen address. The predetermined address group can be withinthe address range called linklocal address.

It is preferable that the determination on whether the apparatus shouldautomatically assign itself an address is performed when the apparatusis powered on. In this manner, when it is determined that the apparatusshould automatically assign itself an address, the apparatus can assignitself an address right after it is powered on. If it is determined thatthe apparatus should not automatically assign itself an address, theapparatus can communicate with other apparatuses in the network by thedefault address, if any, just after it is powered on.

Another aspect of the present invention provides an address decisionsystem which, when a first electronic apparatus is started and it isverified that an address stored in a nonvolatile storage unit is thesame address used by a second electronic apparatus, obtains a result ofcomparison between priorities of both the first and second electronicapparatuses. If the priority of the first electronic apparatus is higherthan the priority of the second electronic apparatus, the stored addressis assigned to the first electronic apparatus. The second apparatus isassigned another address chosen by a second address decision unit. Ifthe priority of the first electronic apparatus is lower, another addresschosen by a first address decision unit is assigned to the firstelectronic apparatus.

The above address decision system allows either of the first and secondelectronic apparatuses which has higher priority to use the address,when both intend to use the same address. Accordingly, by settingpriority of a printer (i.e. first electronic apparatus) which has longbeen using an address A in the above network higher than priority of apersonal computer (i.e. second electronic apparatus), the printer cancontinue using the address A, even if the personal computer assignsitself the address A while the printer is turned off. The apparatuses inthe network which have been sending print data to the address A cansucceed in printing the print data on the printer.

The above address decision system can restrain the address of theapparatus which has higher priority (first electronic apparatus) fromchanging. As a result, workings of important apparatuses with higherpriority cannot be interrupted easily. In addition, this leads toreduction of the network maintenance and running costs. The nonvolatilestorage unit to be used can be EEPROM, backup RAM, hard disk, etc.

It is specifically preferable that the verification device to seewhether the stored address and the address of another apparatus are thesame are provided with the first and second electronic apparatusesrespectively, and that the address decision by the second electronicapparatus is performed when a second verification unit, provided withthe second electronic apparatus verifies that the addresses of the firstand second apparatuses are the same. This enables each of theapparatuses to assign itself different address voluntarily without anyspecific instructions, and simplifies the system structure.

It is specifically preferable that the first address decision unitselects another address for the first electronic apparatus when thecomparison device is unable to compare priorities of the firstelectronic apparatus and a third electronic apparatus which has the sameaddress as the stored address. If the first electronic apparatus keepsthe stored address unilaterally when the comparison is not performed,there is a possibility that two identical addresses exist on thenetwork. Therefore, in such a case, it is desirable to assign anotheraddress to the first electronic apparatus. The comparison is notperformed, for example, when the priority of either of the electronicapparatuses is unknown.

It is preferable that each electronic apparatus in the network mayfunction as the address decision system explained above. In this case,the electronic apparatus, when it is started and verifies that anaddress stored in its nonvolatile storage unit is the same address as isalready being used by another electronic apparatus, obtains a result ofcomparison between priorities of the electronic apparatus itself and theanother electronic apparatus. If the priority of the electronicapparatus is higher than the priority of the another electronicapparatus, the stored address is assigned to the electronic apparatus.If the priority of the electronic apparatus is lower, another addresschosen by an address decision device is assigned to the electronicapparatus.

In this aspect of the invention, it is preferable that the electronicapparatus selects an address at random from a predetermined addressgroup, and after verifying that the chosen address is not being used byanother electronic apparatus, assigns itself the chosen address. Theaforesaid predetermined address group can be within the address rangecalled linklocal address.

The priority to be kept in the electronic apparatus may be at least oneof data and time when the electronic apparatus was assigned an address,a rank based on its characteristics, and a rank based on its user.

For instance, the earlier the date and time when the address of theelectronic apparatus was assigned, the higher the priority of theelectronic apparatus is. Then, it is possible to prevent the address ofthe older apparatus from changing when a new apparatus becomes a memberof the network. It is preferable to store the date and time informationat the time when the assigned address is written to the nonvolatilestorage unit. As to ranking according to the apparatus characteristics,the apparatus such as a server, the address of which is not desirable tobe changed, should be ranked high. As to ranking according to theapparatus user, the apparatus of a general manager can be ranked higherthan a chief. In this manner, stability of the network system based onthe importance of the duties of the user can be achieved.

In order to obtain the result of comparison between the priorities of anelectronic apparatus and another electronic apparatus, it is preferablethat the electronic apparatus comprises a transmission device that sendsthe stored priority of the electronic apparatus itself to the anotherelectronic apparatus, a reception device that receives the priority ofthe another electronic apparatus sent from the another electronicapparatus, and a comparison device that compares the stored priority ofits own and the priority received by the reception device. If theanother apparatus also comprises the aforesaid devices, it is possibleto obtain the result of the priority comparison.

Consequently, there is no need for each of the apparatuses to store thepriority of the apparatus itself together with priorities of otherapparatuses, and for the user to input and manage the priorities.Furthermore, it is not necessary for the server connected to the networkto store, manage and compare the priorities of the respectiveapparatuses. Cases in which the comparison result is not obtained arethose in which the priority to be sent from the another electronicapparatus is not received, and in which the comparison result is notreceived though requested to the server.

If the electronic apparatus of the present invention is a computer, theabove explained address setting function of the electronic apparatus canbe an executable program. In this case, the program may be stored instorage media such as flexible disk, magnet optical disc, CD-ROM, harddisk, ROM and RAM. The computer may load the program from such media orover the network to be executed where appropriate.

An address setting apparatus of the present invention comprises anacquisition device that obtains the current address of the apparatusconnected to a network, and a determination device that determineswhether the obtained address is not of the network to which the addresssetting apparatus belongs and is also not a default address (initialaddress) of the apparatus, and a notification device that notifiesinformation specifying the apparatus.

Accordingly, even if the user changes the address of an apparatus to awrong address which is not of the network to which the address settingapparatus belongs, it is possible to find the apparatus with the wrongaddress.

BRIEF DESCRIPTION OF THE DRAWING

The invention will now be described, by way of example, with referenceto the accompanying drawings, in which:

FIG. 1 is a block diagram showing a printer configuration as anelectronic apparatus of the first embodiment;

FIG. 2 is a flowchart of an address setting process in the printer as anelectronic apparatus of the first embodiment;

FIG. 3 is a flowchart of an IP addressing process by APIPA;

FIG. 4 is an explanatory view illustrating an automatic addressingperformed in an apparatus by APIPA;

FIG. 5 is a block diagram showing a printer configuration as anelectronic apparatus of the second embodiment;

FIGS. 6A and 6B are flowcharts of an address setting process in theprinter as an electronic apparatus of the second embodiment;

FIGS. 7A and 7B are explanatory views illustrating an example of datacontents of a date and time request packet and return packet and an IPaddress and port number;

FIG. 8 is a block diagram showing a configuration of a communicationsystem including a personal computer as an address setting apparatus ofthe third embodiment and a printer as an apparatus;

FIG. 9 is a flowchart illustrating an address setting process in thepersonal computer as an address setting apparatus of the thirdembodiment;

FIG. 10 is an explanatory view showing an address setting process in thepersonal computer as an address setting apparatus of the thirdembodiment and annunciation text to a user; and

FIG. 11 is an explanatory view showing an address setting process in thepersonal computer as a conventional address setting apparatus andnotification to a user.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT First Embodiment

FIG. 1 is a block diagram showing a printer 10 as an electronicapparatus of the present embodiment.

The printer 10 comprises a ROM 12 for storing data and programsnecessary for various operations, a RAM 14 for storing temporary data,an ASIC (Application Specific Integrated Circuit) 16 for executingapplication specific programs, a NVRAM 18 which is a rewritablenonvolatile memory, a network controller 20 for data transmission andreception which monitors packets passing through a LAN and receives andtransmits necessary packets from and to the LAN, a print engine 22 forprinting, a realtime clock (RTC) 24, and a CPU 26 for controlling theforgoing components.

Wide variety of not shown apparatuses such as a plurality of personalcomputers, etc. are connected to the LAN. Each personal computer isprovided with a printer driver for making a printing request to theprinter 10 and a management tool for various settings.

In the printer 10, the CPU 26 executes the programs stored in the ROM 12to control the network controller 20, etc., thereby communication overTCP/IP being enabled. The printer 10 performs an address setting processafter switched on.

Firstly, as shown in step S110 in FIG. 2, it is determined whether an IPaddress has already been assigned by the later-described APIPA in stepS230. In other words, it is determined whether an IP address assigned byAPIPA is stored in the NVRAM 18. If an IP address has been assigned byAPIPA in step S230 (S110: YES), the process proceeds to step S240. Onthe other hand, if an IP address is not assigned by APIPA in step S230(S110: NO), the value of a packet counter for counting the number ofreceived packet and the value of an APIPA counter for counting thenumber of detected APIPA address (or the type of APIPA address) providedin the RAM 14 are set to zero (0) (S120), and the process proceeds tostep S130.

In step S130, an ICMP echo request for an IP address 255.255.255.255 isbroadcast through the LAN. Consequently, all the apparatuses connectedto the LAN transmit an ICMP reply to the LAN.

In step S140, it is determined whether 5 seconds have passed since thepresent address setting process is started. If 5 seconds have not yetpassed (S140: NO), it is determined whether a reply (ICMP reply) packetto the ICMP echo request broadcast in step S130 is received (S150). Ifno reply packet to the ICMP echo request is received (S150:NO), theprocess returns to step S140. If a reply packet to the ICMP echo requestis received (S150: YES), the packet counter is incremented (S160), andit is determined whether an IP address contained in the packet receivedis an IP address in the range (from 169.254.1.0-169.254.254.255)assigned by APIPA (S170).

If the IP address contained in the packet received is not an IP addressassigned by APIPA in step S170 (S170: NO), the process returns to stepS140 to check another packet. If an IP address contained in the packetreceived is an IP address assigned by APIPA (S170:YES), the APIPAcounter is incremented (S180), and the process returns to step S140. Inother words, by repeating steps S140-S180, the number of reply (value ofthe packet counter) to the ICMP echo request broadcast in step S130 andthe number of APIPA address (value of the APIPA counter) are counted(packet counter≧APIPA counter).

If it is determined that five seconds have passed since this process isstarted (S140: YES), steps S190 and afterward are performed. In otherwords, it is determined in step S190 whether the APIPA counter is equalto or more than an integer N. The N may be set to one (1), for example,or any plural number. If it is determined that the APIPA counter is lessthan N (S190: NO), it is determined whether the ratio of the APIPAcounter to the packet counter is equal to or more than 0.2, or thenumber of packet containing an APIPA address is equal to or more than20% of the received packets (S200). The value of 20% can be changed atdiscretion of the network administrator.

If it is determined in step S200 that the ratio of the APIPA counter tothe packet counter is less than 0.2 (S200: NO), it is further determinedwhether the packet counter is equal to or less than an integer M (S210).

If, and as far as, steps S190-S210 are all negatively determined, an IPaddress of the printer 10 is set to a default IP address 192.0.0.192(S220), and the process proceeds to step S240. On the other hand, if anyone of steps S190-S210 is positively determined, APIPA is performed(S230), and the process proceeds to step S240.

If one of the followings are true: an IP address by APIPA has alreadybeen set in step S110 (S110: YES); a default IP address has been set instep S220; and APIPA has been performed in step S230, then, the processreturns to step S110 after a sleep of 30 seconds in step S240.

Here, APIPA (S230) performed in FIG. 4 is explained in detail by way ofa flowchart shown in FIG. 3.

When this process is started, an IP address is selected from the addressrange from 169.254.1.0-169.254.254.255 at random (S300), and an ARPrequest for the chosen IP address is sent to the LAN from the networkcontroller 20 (S310). Then, it is determined whether there is a responseto the ARP request made in step S310 from the LAN to the networkcontroller 20 (S320). In other words, it is determined whether thechosen IP address is not being used by another apparatus connected tothe LAN. If there is a response (S320: YES), the process returns to stepS300 since the chosen IP address is already in use, and select anotherIP address. On the other hand, if there is no response received (S320:NO), the chosen IP address is not in use, and the chosen IP address isset to an address of its own (printer 10) (S330), and the IP address isstored in the NVRAM 18.

As above, in this embodiment, an ICMP echo request for 255.255.255.255is broadcast, and from the resultant reply, it is determined whetherthere are N or more apparatuses (terminals, etc.) to which the IPaddress is assigned by APIPA (S190), or whether the ratio of the numberof replies from the apparatuses to which the IP address is assigned byAPIPA out of the total number of replies is equal to or more than apredetermined value (S200). Since it is determined whether an IP addressshould be set by APIPA as such, it is possible to prevent APIPA frombeing executed in a LAN environment in which it is considered that APIPAis not adopted. In other words, since APIPA is executed after it isensured that the present network environment seems to adopt APIPA, nounnecessary IP addressing (automatic addressing) is executed.

When a new network environment adopting APIPA is being constructed, evenif an ICMP echo request for 255.255.255.255 is broadcast, there is noapparatus which makes a reply (or almost none at the stage of thebeginning of constructing the network). Therefore, no positivedetermination result is obtained in steps S190 and S200, and it islikely that a network adopting APIPA can never ever be built. However,even if negative determination results are obtained in steps S190 andS200, proper address settings are possible if the apparatus is designedto execute APIPA when the number of apparatuses responding to thebroadcast is equal to or less than M (it is desirable that M is equal tozero (0) or an extremely small value compared to the number of terminalsconnectable to the network) (S210: YES).

Accordingly, when the LAN environment does not adopt APIPA, it ispossible to perform various operations, by using default IP addresses,like setting a new IP address to the printer 10 by way of a managementtool conventionally used in a personal computer, etc.

In the present embodiment, it is determined whether APIPA is executedbased on the reply (S190-S210, etc.) to an ICMP echo request broadcast(S130). However, packets passing through a LAN may be monitored(received) via the network controller 20 (this step is equivalent toS150: YES), and it may be determined whether an IP address contained inthe monitored packet is an IP address assigned by APIPA (this step isequivalent to S170), for example.

In the present embodiment, determination results in steps S190-S210 arenot outputted. However, the results may be displayed on an operationpanel of the printer 10, printed via the print engine 22, outputted tothe LAN via the network controller 20, or outputted to a not shownspeaker as a voice message.

In the present embodiment, the printer comprises determination devicesfor both steps S190 and S200 as an example. However, the printer maycomprise only one of the above devices. The determination in step S210may be canceled.

In the present embodiment, an ICMP echo request for an address255.255.255.255 is broadcast in step S130, and the apparatuses replyingto the echo request (in the packet counter) and the apparatuses havingan APIPA address (in the APIPA counter) among the apparatuses makingreplies are counted. Based on the results of the counts, thedetermination in steps S190-S210 is made. However, it is also possibleto broadcast an ICMP echo request for an address 169.254.255.255 in stepS130.

Configured as above, apparatuses replying to the broadcast are limitedto those which are assigned an APIPA address. Therefore, only bycounting the apparatuses replied (S150 and S160), the number ofapparatuses having an APIPA address can be found, and a load to thenetwork and the printer 10 itself is reduced (in this case, steps S170and S180 are deleted). Based on the number of replied apparatuses havingan APIPA address, determination equivalent to step S190 may beperformed, and it is determined whether or not APIPA should be executedselectively (steps S200 and S210 are deleted).

In the present embodiment, the printer 10 is described as an example ofan electronic apparatus. However, the electronic apparatus can be apersonal computer connected to the LAN, and the printer 10 may onlyperform steps S120-S180 and print the determination results in stepsS190-S210. In this manner, when the printer 10 is being connected to theLAN, it is possible to determine whether APIPA in the printer 10 shouldbe activated based on the determination results performed by thepersonal computer. Accordingly, even if the printer 10 configured forAPIPA is connected to a LAN which is not adopting APIPA, it is possibleto take precautions against a possible accident in which communicationis disabled due to automatic execution of APIPA.

Second Embodiment

FIG. 5 is a block diagram showing a printer 30 as an electronicapparatus of the present embodiment.

The printer 30 comprises a ROM 32 for storing data and programsnecessary for various operations, a RAM 34 for storing temporary data,an ASIC 36 for executing application specific programs, a NVRAM 38 whichis a rewritable nonvolatile memory for storing various settingsincluding the address, priority, etc. of the printer 30, a networkcontroller 40 for data transmission and reception by monitoring andreceiving necessary packets passing through a LAN and transmittingpackets to the LAN, a print engine 42 for printing, a realtime clock(RTC) 44 for keeping the present date and time, and a CPU 46 forcontrolling the foregoing components.

There are wide variety of apparatuses (not shown) connected to the LAN,such as a plurality of personal computers, etc. Each of the personalcomputers is provided with a printer driver for making a printingrequest to the printer 30 and a management tool for various settings.

In the printer 30, the CPU 46 executes the programs stored in the ROM 32to control the network controller 40, etc., thereby communication overTCP/IP being enabled. The printer 30 receives printing requests andsetting requests from the personal computers, etc. via the LAN andperforms printing and setting. As an initialization process forrealizing the communication, the printer 30 performs an address settingprocess for assigning itself an IP address for communication over TCP/IPafter switched on. This address setting process is now explained by wayof flowcharts shown in FIGS. 6A and 6B.

After the printer 30 is switched on, the CPU 46 determines whether theIP address, of the printer, used last time is written to (stored in) theNVRAM 38, as shown in step S410 in FIG. 6A. If the IP address has beenwritten (S410: YES), the process moves to step S470. If the IP addressis not written (S410: NO), the process moves to step S420.

Steps S420-S450 illustrate an IP address decision process through APIPA,which is shown in FIG. 4. Particularly, it is the process to select anIP address at random (S420), send an ARP request for the chosen IPaddress to the LAN from the network controller 40 (S430), and seewhether there is a response to the ARP request in step S430 from the LANto the network controller 40 (S440). In other words, it is determinedwhether the chosen IP address is being used by another apparatus in theLAN. If there is a response (S440: YES), the process returns to stepS420 to select another IP address, since the chosen IP address isalready in use. On the other hand, if there is no response (S440: NO),the chosen IP address is not in use, and is set to an IP address of theprinter 30 (S450). As shown in FIG. 4, the address 169.254.78.22 isassigned to the printer 30, for example.

In step S460, the IP address decided in steps S420-S450 and the presentdate and time kept by the RTC 44 are written to (stored in) the NVRAM38. The decided IP address 169.254.78.22 is written, for example.

In step S470, an ARP request for the IP address written to the NVRAM 38is sent to the LAN. In step S480, it is determined whether there is aresponse to the request. In other words, it is verified whether the IPaddress stored in the NVRAM 38 is being used by another apparatus in theLAN.

If there is a response, that is, the IP address is being used by anotherapparatus (S480: YES), the process moves to step S490. If there is noresponse, that is, no apparatus is using the IP address (S480: NO), theprocess moves to step S510.

In step S490, the date and time written in step S460 are read from theNVRAM 38, and are sent to an apparatus which has responded (responder)in step S480.

As shown in FIG. 7A, in this transmission of date and time, a packetincluding a flag indicating a date and time request packet andinformation on the date and time of the IP address acquisition by theprinter 30 (that is, the date and time read from the NVRAM 38) is sentby UDP (User Datagram Protocol). The destination address is the IPaddress of the apparatus which has responded (that is, the same IPaddress stored in the NVRAM 38), and a destination port number is 2436defined for this request. FIG. 7A illustrates an example in which the IPaddress 169.254.78.22 stored in step S460 is being used by anotherapparatus (that is, there is an IP address conflict).

In step S495, it is determined whether a return packet (like the oneshown in FIG. 7B) transmitted from the responder is received in responseto the date and time request packet transmitted in step S490. When thereturn packet is not received (S495: NO), the process proceeds to stepS420. If the return packet is received (S495: YES), the process proceedsto step S500. In step S500, date and time contained in the return packettransmitted from the responder is compared with the date and time readfrom the NVRAM 38. If the date and time in the responder side is later(S500: NO), the process goes to step S510. If there is no return packetfrom the responder (S495: NO), or the date and time in the responderside is earlier (S500: YES), the IP address of the printer 30 is decidedthrough the aforementioned step S420 onward by APIPA. If no returnpacket is received in step S495 (S495: NO), it is considered that anapparatus having no reply function to the date and time request packetmay have the same IP address as the printer 30, for example. In suchcases in which priorities of other apparatuses cannot be known (nocomparison are made due to unknown priorities) and the IP address of theprinter 30 is maintained at discretion, there is a possibility that thesame IP address may exist in the network. Therefore, it is desirable toassign the printer 30 another IP address by executing step S420 onward.

In step S510, the IP address stored in the NVRAM 38 is set to the IPaddress of the printer 30.

Accordingly, the printer 30 can use the IP address stored in the NVRAM38, when the IP address stored in the NVRAM 38 does not conflict withthe IP address currently used by another apparatus (S480: NO), and whenthe date and time of the IP address acquisition by another apparatus islater than the time and date of the IP address acquisition (time anddate stored in step S460) by the printer 30 (S500: NO) even if the IPaddress stored in the NVRAM 38 does conflict with the IP addresscurrently used by the another apparatus.

From now on, a process in which the printer 30 serves as theaforementioned another apparatus, that is, in case the printer 30 is therecipient of the date and time request packet transmitted in step S490,is explained.

As shown in FIG. 6B, this process is performed after step S460 or S510in FIG. 6A.

In step S520 in FIG. 6B, the process proceeds to step S530 when data isreceived from the LAN (that is, when data is received at theaforementioned UDP port number 2436).

In step S530, it is determined whether the received data is the date andtime request packet. If it is the date and time request packet (S530:YES), the process proceeds to step S540. If it is not the date and timerequest packet (S530:NO), the process moves to step S570. In step S570,other operations except the address setting process are performed.

In step S540, the date and time contained in the received date and timerequest packet is compared with the date and time stored in the NVRAM38. In step S550, it is determined whether the date and time containedin the received date and time request packet is earlier than the dateand time stored in the NVRAM 38. If the date and time contained in thereceived date and time request packet is earlier than the date and timestored in the NVRAM 38 (S550: YES), the process moves to step S560.Otherwise (S550: NO), the process moves to step S580.

In steps S560 and S580, the date and time stored in the NVRAM 38 of theprinter is sent as a reply to the sender of the date and time requestpacket. This reply is made via a packet as shown in FIG. 7B.Particularly, the IP address of the printer 30 is set to a source IPaddress, the destination address is set to a broadcast address, and theaforementioned UDP port number 2436 is set to the destination portnumber. Then, a packet including a flag indicating a return packet andinformation on the date and time when the IP address is acquired (thatis, the date and time stored in the NVRAM 38) is transmitted.

After step S560, the process returns to step S420 in FIG. 6A, and a newIP address is again selected and determined by the aforementioned APIPA.

On the other hand, after step S580, the process moves to step S520. Inshort, the printer 30 uses the IP address continuously.

As above, when the IP address of the printer 30 conflicts with the IPaddress of another apparatus (S480: YES) and there is no reply from theanother apparatus 495: NO) or the date and time of the IP addressacquisition by the printer 30 is later than the date and time of the IPaddress acquisition by the another apparatus (S500: YES), the printer 30changes its IP address. If the IP address conflicts with the IP addressof the another apparatus and the date and time of the IP addressacquisition by the printer 30 is earlier than the date and time of theIP address acquisition by the another apparatus (S500: NO), the printer30 can keep using its IP address.

Accordingly, even if another printer 30 is connected to a LAN to whichthe printer 30 is connected, the printer 30 which has been using theaddress for long can keep using the address without change. The userscan send printing requests to the printer 30 which has been identifiedby the address for long to print from the personal computers on the LAN.In this way, it is possible to maintain stability of the network.

In the present embodiment, the printer 30 performs the processes shownin FIGS. 6 and 7. However, various apparatuses other than the printercan also perform those processes.

Additionally, in the present embodiment, the date and time when the IPaddress is assigned in step S460 is stored, and then, on the basis ofpriority, it is determined in steps S500 and S550 whether the apparatuscontinues to use the IP address. However, various information other thanthe date and time can be the basis of the determination. For example,instead of using the date and time in step S460, priority of the printer30 itself (according to the rank of the user who uses the printer 30 orthe rank given based on the characteristics of the apparatus itself, forinstance) may be stored. Such priorities may be set via the LAN, or bymeans of an operation panel provided in the printer 30. The priority maybe determined by comprehensive assessment of various kinds ofpriorities.

In the present embodiment, in order to obtain priorities of otherapparatuses, the priority information transmitted from the otherapparatuses in step S560 or S580 have to be received by the printer 30(S495: YES). However, though it may bother the administrator or user,the priorities of the printer 30 and the other apparatuses as well maybe inputted in advance in the printer 30. In this case, otherapparatuses for which the priorities are not inputted by theadministrator or user assign themselves another IP address (S420-S450),as in the case that no response is received from the other apparatusesconcerning the date and time information in S495 (S495: NO), since theirpriorities are unknown.

Moreover, in the present embodiment, the printer 30 has the device thatverifies that the same IP address is not used on the LAN, the devicethat compares the priorities, and the device that stores the prioritydata, as an example. However, these devices may be provided with aserver on the network, and the server may compare the priorities andstore the priority data. In other words, the printer 30 may only makeinquiries to the server for the comparison results and the priorities.In this case, the verification steps S430-S440 and S470-S480 forensuring that a certain IP address is not used by other apparatusesconnected to the network may be replaced by the steps for makinginquiries to the server and interpreting the resultant response from theserver. Similarly, the steps S490-S500 for obtaining the results of thepriority comparison between the printer 30 and the other apparatuses maybe replaced by the steps for making inquiries to the server andinterpreting the resulting response from the server. The server may beanother printer connected to the LAN.

Third Embodiment

This embodiment relates to an address setting apparatus for assigning anaddress to an electronic apparatus in a network.

There is a network printer provided with a default address to be usedwhen it fails to obtain an IP address from a DHCP server. The defaultaddress is, for example, an IP address of 192.0.0.192, a subnet mask of0.0.0.0, and a gateway address of 0.0.0.0, as shown in FIG. 11.

There is also a management tool, running on a personal computer, forconfiguring an apparatus in a network. This tool communicates with theapparatus by the default address and changes the default address towhich the user designates. It is possible to change the address of aprinter connected to the network by executing the management tool on apersonal computer connected to the network. Hereafter, the process ofchanging the address by the management tool is explained by way of FIG.11.

As shown in FIG. 11, the personal computer broadcasts a request for theMAC address and sysObjectID over SNMP through the network. Variousapparatuses connected to the network respond to this request and returntheir MAC addresses and sysObjectIDs. In these responses, the IPaddresses of those apparatuses are also contained.

The personal computer which received these responses selects anapparatus of which vendor code contained in the sysObjectID is to bemanaged by the management tool and the IP address of which is set to adefault address of the apparatus (that is, 192.0.0.192), and thendisplays the MAC address of the chosen apparatus as undefined apparatusin a dialog as shown in the middle portion of FIG. 11. In FIG. 11, twoprinters are identified as undefined apparatus of which address is notdefined.

When the user selects the MAC address of the apparatus having the IPaddress to be defined with a mouse, etc. of the personal computer, anaddress setting form for the IP address, subnet mask and gateway addressis displayed, to which the user can input those values using a keyboard,etc. For example, when the network address, subnet mask and gatewayaddress of the personal computer executing the management tool are192.168.123.0, 255.255.255.0 and 0.0.0.0, respectively, the user inputsan address 192.168.123.100, which is not being used by another computerin the network, for the IP address, and addresses 255.255.255.0 and0.0.0.0 respectively for the subnet mask and gateway address of theprinter. When these values are inputted, the personal computerbroadcasts the inputted IP address, subnet mask and gateway address overSNMP through the network and instructions the printer to assign itselfthese addresses. At this time, the chosen MAC address is broadcast as“MAC address confirmation”.

The apparatus which is identified by the MAC address confirmationassigns itself the sent IP address, subnet mask and gateway address. Inthe above example, the network address of 192.168.123.0, subnet mask of255.255.255.0 and IP address of 192.168.123.100 are set as the staticaddresses of the printer. The management tool communicates with theprinter by the address set as above to display the printer status and tochange the printer settings.

As described above, the MAC address of the apparatus having a default IPaddress of 192.0.0.192 is shown in the dialog in FIG. 11. Here, if theuser inputs a wrong network address for the chosen apparatus, a problemoccurs that the settings of the apparatus are unable to be changed bythe personal computer any longer. For instance, if the user inputs theaddress 192.186.123.100 by mistake for the apparatus in theaforementioned network, the management tool can no longer communicatewith the apparatus and change the addresses of the printer with themanagement tool.

In addition, if the printer comprises an APIPA feature, the printerautomatically assigns itself an address and then, the management tool isunable to assign the printer another address since the printer is notidentified as undefined apparatus.

The present embodiment provides an address setting apparatus comprisingan acquisition device that obtains the current address of the apparatusconnected to a network, and a determination device that determineswhether the obtained address is not of the network to which the addresssetting apparatus belongs and is also not a default address (initialaddress) of the apparatus, and a notification device that notifiesinformation specifying the apparatus.

Here, the expression “the obtained address is not of the network towhich the address setting apparatus belongs” means that the networkaddresses of the obtained address and of the address setting apparatusare not the same. For instance, if the network address and the IPaddress of the address setting apparatus are 192.168.123.0 and192.168.123.20, respectively, and the address obtained is192.186.123.100, the obtained address is not of the network to which theaddress setting apparatus belongs and also it is not the default addressof the apparatus (for example, 192.0.0.192). As a result, theinformation specifying the apparatus having this address is notified.

Accordingly, even if the user changes the address of an apparatus to awrong address which is not of the network to which the address settingapparatus belongs, it is possible to find the apparatus with the wrongaddress.

In addition, the address setting apparatus of the present embodimentcomprises an input device that inputs an address to be assigned to thenotified apparatus, and a transmission device that transmitsinstructions for the notified apparatus to assign itself the inputtedaddress through the network. Therefore, it is easy for the user tocorrect the address of the apparatus which is assigned a wrong address.

It is preferable that the address setting apparatus of the presentembodiment, when it is determined that the obtained address is anaddress to be used for an apparatus to assign itself, notifiesinformation specifying the apparatus having the obtained address.

The address to be used for an apparatus to assign itself can be an IPaddress in a range which can be assigned by APIPA. In this manner, it ispossible to change the address which the apparatus automaticallyassigned itself by the address setting apparatus of the presentembodiment.

It is preferable that the notification device also notifies informationspecifying the address of the apparatus when it is determined that theobtained address is the default address of the apparatus. It is furtherpreferable that the notification device can notify informationspecifying the apparatus when it is determined that the apparatussatisfies one of the aforesaid conditions: that is, when the address ofthe apparatus is of the network to which the address setting apparatusbelongs; when the address of the apparatus is an address used for theapparatus to assign itself; and when the address of the apparatus is adefault address of the apparatus.

It is preferable that the information specifying the apparatus to benotified are obtained when the acquisition device obtains the address ofthe apparatuses since this avoids heavy traffic in the network. Theinformation may be the obtained address (IP address, for example),vendor code, or model of the apparatus. The information can also be theMAC address of the apparatus, or the factor in notifying the informationspecifying the apparatus. The factor in notifying the informationspecifying the apparatus may be such information that the address of theapparatus is not of the network to which the address setting apparatusbelongs, that the address of the apparatus is a default address of theapparatus, and that the address of the apparatus is an address used forthe apparatus to assign itself. By notifying the factor, the user cansee why the address of the apparatus was obtained, and determine whetherthe address of the apparatus should be modified.

It is preferable to that the address setting apparatus comprises aselection device that lists the information specifying the apparatus andallows the user to select an apparatus if the apparatus notified is morethan one.

Various protocols, such as SNMP, can be used for the address acquisitionand transmission of address setting instructions. For example, SNMPbroadcast can be used.

In case of a network in the IP environment, it is preferable that theaddress setting instructions contain an IP address, subnet mask, andgateway address. It is further preferable that the instructions containthe MAC address of the apparatus notified. Then, the apparatus in thenetwork compares its MAC address and the MAC address transmitted, andwhen both addresses agree, assigns itself the transmitted IP address,subnet mask and gateway address.

If the address setting apparatus of the present embodiment is acomputer, the above explained address setting function can be anexecutable program. Such a program may be stored in the storage media ortransmitted via the network as described in the first and secondembodiments.

The present embodiment will now be described, by way of example.

FIG. 8 is a block diagram illustrating a configuration of acommunication system 1 which comprises printers 60 a-60 c (hereinafter,referred to as printers 60 as well) and a personal computer (PC) 53 asan address setting apparatus adapted for the present embodiment.

As shown in FIG. 8, the printers 60 and the personal computer 53 areconnected to the communication system 1 and provided with LAN interfaces(I/F) 54, 61 which are respectively connected to a LAN cable 55 to builda local area network (LAN).

The printer 60 in the LAN comprise a print portion, a user interface(I/F), a communication control portion, the aforesaid LAN I/F 61, a USBinterface (I/F) and a control portion, respectively, and prints the datatransmitted from an external apparatus such as the personal computer 53via the LAN. The print portion comprises a paper feeding and deliverymechanism, and a printing mechanism for printing data transmitted fromthe personal computer 53, etc. via the LAN I/F 61. The user I/Fcomprises a display portion such as a liquid crystal display, and anoperation portion such as a key switch. In the user I/F, instructionscorresponding to user operations are inputted to the control portionfrom the operation portion, and a message, etc. transmitted from thecontrol portion is displayed on the display portion. On the displayportion, information indicating the running status of the printers 60and the settings of the address, etc. of the LAN I/F 61 are displayed,for example.

The LAN I/F 61 connects the printers 60 to the LAN, and via the LAN, itrealizes bi-directional communication with the personal computer 53 andother apparatuses in the LAN. For instance, the LAN I/F 61 obtainsprinting data from the external apparatus (such as the personal computer53) over TCP/IP, IPX/SPX, etc. Then, it inputs the data to the controlportion and reports the running status of the printers 60 to theexternal apparatus (such as the personal computer 53) according to theinstructions from the control portion.

The LAN I/F 61 can also communicate with the external apparatus(personal computer 53) over SNMP, and as will be explained later, itcommunicates with the address setting apparatus (personal computer 53)over SNMP and operates address data stored in the control portionaccording to the instructions from the address setting apparatus(personal computer 53 in the present embodiment).

The printers 60 a and 60 b are given an IP address of 192.0.0.192, asubnet mask of 0.0.0.0 and a gateway address of 0.0.0.0 as defaultaddress before shipped. The printer 60 c automatically assigns itself anIP address in the range from 169.254.1.0-169.254.254.255 by APIPA afterstarted. The MAC addresses of the printers 60 a, 60 b and 60 c are,respectively, 00:80:77:12:34:56, 00:80:77:34:5 E:FD and00:80:77:E2:A5:33.

The personal computer 53 is assigned an IP address of 192.168.123.20, asubnet mask of 255.255.255.0 and a gateway address of 0.0.0.0. A printerdriver for transmitting printing data to the printers 60 via the LAN anda management tool for configuring the printers 60 via the LAN areinstalled to a hard disk drive (HDD) 65 of the personal computer 53.This management tool is distributed by recording media such as a CD-ROMand DVD, or over networks. The user installs the management tool to theHDD 65 of the personal computer 53, and the CPU 56 executes the programof the management tool installed to the personal computer 53 so that thepersonal computer 53 functions as an address setting apparatus adaptedfor the present embodiment. The personal computer 53 is an ordinarycomputer comprising a nonvolatile storage medium ROM 57, a readable andwritable storage medium RAM 58, the HDD 65, etc. The display portion 59comprises an LCD, etc., and displays a list of MAC addresses of theprinters 60 and an address setting form. The operation portion 62comprises a keyboard 63, a mouse 64, etc. The operation portion 62allows the user to select a desired MAC address from the list of MACaddresses of the printers 60 and to input a desired IP address, etc. tothe address setting form displayed on the display portion 59.

Hereafter, an address setting process performed by the management toolon the personal computer 53 is described by way of a flowchart shown inFIG. 9. The personal computer 53 functions as an address settingapparatus of the present embodiment.

When the user instructions via the operation portion 62 areacknowledged, the value of a display counter stored in the RAM 58 is setto zero (0) (S1), and then a request for a MAC address and sysObjectIDis broadcast over SNMP through the LAN (S2).

It is determined whether there is a response to the SNMP broadcast instep S2 from an apparatus in the LAN. If there is a response (S3: YES),it is determined whether the returned sysObjectID is the desired one(S4). In other words, it is determined whether the apparatus which hasresponded is an apparatus to be managed by the management tool based onthe vendor code contained in the sysObjectID. If the returnedsysObjectID is not the desired one (S4: NO), the apparatus is determinednot to be managed by the management tool, and the process returns tostep S3 to check a response from another apparatus.

If it is determined in step S4 that the returned sysObjectID is thedesired one (S4: YES), it is determined whether the IP address of theapparatus which has responded is a default address of the apparatus(S5), whether the IP address of the apparatus has the same networkaddress as the personal computer 53, that is, whether the networkaddress of the apparatus is of the network to which the personalcomputer 53 belongs (S6), or whether the IP address of the apparatus isan address in a range which can be assigned by APIPA (S7). If the IPaddress of the apparatus is a default address of the apparatus (S5:YES), the network address of the apparatus is not of the network towhich the personal computer 53 belongs (S6: NO), and the IP address ofthe apparatus is an address in the range which can be assigned by APIPA(S7: YES), then, information on the apparatus are stored in the RAM 58as the information of the undefined apparatus and the value of thedisplay counter is incremented (S8). If the IP address of the apparatusis not a default address of the apparatus (S5: NO), the network addressof the apparatus is of the network to which the personal computer 53belongs (S6: YES), and the IP address of the apparatus is not an addressin the range which can be assigned by APIPA (S7: NO), then the processreturns to step S3 to check a response from another apparatus since itis not necessary to display the apparatus as undefined apparatus.

If there is no response from other apparatuses in step S3 (S3: NO), itis determined whether no response has been received for a predeterminedtime (S9). If the predetermined time has not passed (S9: NO), theprocess returns to step S3. If no response has been received for thepredetermined time (S9: YES), it is determined whether the value of thedisplay counter is zero (0) (S10). If the value of display counter iszero (0) (S10: YES), the address setting process is ended since there isno undefined apparatus. If the value of the display counter is not zero(0) (S10: NO), a list of MAC addresses of the apparatuses stored in theRAM 58 in step S8 is displayed on the display portion 59 (refer to themiddle part of the later explained FIG. 10) (S11).

Then, the user gives instructions via the operation portion 62 to thelist of MAC addresses of the apparatuses displayed on the displayportion 59 in step S11 (S12). If the instructions are to cancel (S12:cancel command), the address setting process is ended. If the userselects an apparatus to set the address (S12: apparatus selectioncommand), the address setting form (not shown) for the chosen apparatusis displayed on the display portion 59 (S13).

If the user inputs an IP address, a subnet mask and a gateway addressfor the chosen apparatus by the keyboard 63 of the operation portion 62to the address setting form displayed on the display portion 59 (S14:address setting command), the inputted IP address, subnet mask, gatewayaddress are broadcast through the LAN over SNMP (S15), and a request issent to the chosen apparatus to assign itself the addresses, and theaddress setting process is ended. If the address setting is canceled bythe user (S14: cancel command), the address setting process is ended.

A specific example of the operations of the aforementioned addresssetting process is described below. As shown in FIG. 10, the personalcomputer 53 broadcasts a request for a MAC address and sysObjectID overSNMP through the LAN.

Various apparatuses including the printers 60 connected to the LANreturn their MAC addresses and sysObjectIDs in response to the SNMPbroadcast. The IP addresses of the respective apparatuses are alsocontained in these responses.

The personal computer 53, which has received the returned MAC addressesand sysObjectIDs, displays the MAC addresses of the apparatuses whichsatisfy the following conditions: the vendor code indicated by thesysObjectID is of the printers 60 to be managed by the management tool;and the source IP address of the returned IP address is one of thedefault address of the printers 60 a, 60 b (i.e. 192.0.0.192) and isalso an address in the range from 169.254.1.0-169.254.254.255 which canbe assigned by APIPA, as undefined apparatus in a dialog as shown in themiddle part of FIG. 10. Not only the MAC address but also the factor innotifying the information are also shown. In other words, if thereturned IP address is an address in the range for APIPA, indication of(APIPA) is added to the MAC address, and if it is the default address,only the MAC address is shown.

Accordingly, as shown in FIG. 10, the respective MAC addresses of theprinters 60 are shown. With respect to the printer 60 c, indication of(APIPA) is added to the MAC address.

With such indication, the user can identify the MAC address of theapparatus which is assigned neither IP address obtained by a DHCP servernor a static address. Also, the user can see whether the IP address ofthe apparatus having the displayed MAC address is a default address oran address assigned by APIPA.

The user can select the MAC address of the apparatus of which IPaddress, etc. is to be changed from a list of the MAC addresses by meansof the mouse 64 and the keyboard 13 provided with the personal computer53.

For example, if the user wishes to change the IP address of the printer60 c to an IP address of 192.168.123.100 which contains the networkaddress of the LAN to which the personal computer 53 is connected, theuser selects the MAC address of 00:80:77:E2:A5:33 (APIPA) in the dialogshown in the middle part of FIG. 10.

The personal computer 53, when it detects such selection, displays a notshown setting form for an IP address, subnet mask and gateway addressinput. The user can make an input to the setting form via the keyboard63, etc.

The user inputs an IP address of 192.168.123.100, a subnet mask of255.255.255.0 and a gateway address of 0.0.0.0 as the addresses to beassigned to the printer 60 c.

When these addresses are inputted, the personal computer 53 broadcaststhe inputted IP address, subnet mask and gateway address over SNMPthrough the LAN, and requests the printer 60 c to assign itself theseaddresses. In this respect, the personal computer 53 broadcasts theselected MAC address as “MAC address confirmation”.

Among the apparatuses in the LAN, the apparatus having the same MACaddress as the MAC address confirmation assigns itself the requested IPaddress, subnet mask, gateway address. In other words, the printer 60 cassigns itself an IP address of 192.168.123.100, a subnet mask of255.255.255.0 and a gateway address of 0.0.0.0.

In the above manner, it is possible to change the address of the printer60 c of which address was once assigned by APIPA.

In the above shown example, it is also possible to configure both thenew type of printer 60 c and the conventional printers 60 a 60 b by thesame management tool.

In the specific operation example according to FIG. 10, the MAC addressof the apparatus is displayed if the source IP address is a defaultaddress or an address in the range to be assigned by APIPA. However, itis also possible to display the MAC address of the apparatus if thesource IP address contains a network address different from the networkaddress of the LAN to which the personal computer 53 belongs. In thismanner, even if the user assigns a wrong IP address of 192.186.123.100to the printer 60 c in the above example, the MAC address of the printer60 c is displayed in the dialog as undefined apparatus. Accordingly, ifa wrong IP address is assigned, it is possible to correct the error.

Furthermore, in case that the personal computer 53 is assigned an IPaddress by APIPA, it can communicate with the apparatus having anaddress in the range to be assigned by APIPA. In this case, the MACaddress of the apparatus which has such an address may not benecessarily displayed in the dialog.

In the above embodiment, the device that notifies the undefinedapparatus to the user is the display portion 59. However, thenotification may be given to the user as a voice message. Furthermore,addresses inputted by the user via the operation portion 62 in the aboveembodiment may be inputted by the user voice.

The present invention should not be limited to the embodiments describedbelow, and other modifications and variations may be possible withoutdeparting from the technical scope of the invention.

1. An address setting apparatus for assigning, via a network, an addressto an apparatus in the network, the address setting apparatuscomprising: at least one processor programmed to control: an acquisitiondevice that obtains the address of the apparatus via the network; afirst determination device that determines whether or not the addressobtained by the acquisition device is of the network to which theaddress setting apparatus belongs; a second determination device thatdetermines whether or not the address obtained by the acquisition deviceis a default address of the apparatus; a list generation device thatgenerates a first apparatus list which indicates apparatus informationcorresponding to the address, when it is determined by the seconddetermination device that the address is a default address of theapparatus, as an apparatus requiring address setting; a notificationdevice that notifies a user with the first apparatus list generated bythe list generation device; a list addition device that adds, to thefirst apparatus list, a second apparatus list which indicates apparatusinformation corresponding to the address which is determined by thefirst determination device that the address is not of the network towhich the address setting apparatus belongs and further determined bythe second determination device that the address is not a defaultaddress of the apparatus; an input device that allows the user to inputan address to be assigned to the apparatus notified by the notificationdevice; and a transmission device that sends instructions for theapparatus notified by the notification device to assign itself theaddress inputted by the input device.
 2. The address setting apparatusas set forth in claim 1 wherein said acquisition device obtainsinformation specifying said apparatus together with the address of theapparatus.
 3. The address setting apparatus as set forth in claim 1wherein said notification device notifies a MAC address of saidapparatus as said information specifying the apparatus together with afactor in notifying the information specifying the apparatus.
 4. Theaddress setting apparatus as set forth in claim 3 wherein said factorindicates how the address of the apparatus is set.
 5. The addresssetting apparatus as set forth in claim 4 wherein said factor is eitherof information on whether the address of said apparatus is of saidnetwork to which the address setting apparatus belongs, or whether theaddress of the apparatus is a default address of the apparatus.
 6. Theaddress setting apparatus as set forth in claim 1 wherein saidnotification device can display information specifying a plurality ofsaid apparatuses in a list, and the address setting apparatus furthercomprises a selection device that selects an apparatus for which saidaddress is inputted from the list of information.
 7. The address settingapparatus as set forth in claim 1 wherein a SNMP broadcast is used whenthe address setting apparatus performs said address acquisition andtransmission of the instructions for setting the address.
 8. The addresssetting apparatus as set forth in claim 1 wherein said instructions forsetting the address include an IP address, a subnet mask and a gatewayaddress.
 9. The address setting apparatus as set forth in claim 1wherein said instructions for setting the address include the MACaddress of the apparatus notified.
 10. A non-transitorycomputer-readable storage medium encoded with a program executed by aprocessor of an address setting apparatus for assigning, via a network,an address to an apparatus in the network, the program comprising:obtaining, by an acquisition device, the address of the apparatus viathe network; determining, by a first determination device, whether ornot the address obtained by the acquisition device is of the network towhich the address setting apparatus belongs; determining, by a seconddetermination device, whether or not the address obtained by theacquisition device is a default address of the apparatus; generating afirst apparatus list which indicates apparatus information correspondingto the address, when it is determined by the second determination devicethat the address is a default address of the apparatus, as an apparatusrequiring address setting; notifying, by a notification device, a userwith the first apparatus list; adding to the first apparatus list, asecond apparatus list which indicates apparatus informationcorresponding to the address which is determined by the firstdetermination device that the address is not of the network to which theaddress setting apparatus belongs and further determined by the seconddetermination device that the address is not a default address of theapparatus; presenting an user interface in which the user, via an inputdevice, inputs an address to be assigned to the apparatus notified bythe notification device; and transmitting, via a transmission device,instructions for the apparatus notified by the notification device toassign itself the address inputted by the input device.